package com.topxgun.gcode.utils;

import java.io.File;
import java.io.IOException;

public class FileUtils {

    public static Boolean fileExit(String path) throws IOException {
        path = path.replace("//", "\\");
        //path = path.replace("//","");
        path = path.replace("\\", "\\\\");
        File file = new File(path);
        if (file.exists()) {
            if (file.isDirectory()) {
                return true;
            } else {
                file.mkdirs();
                return false;
            }
        } else {
            file.mkdirs();
            return false;
        }
    }
}
